package org.com.app.knock; //123456qaz
///*
// * Copyright 2013 Google Inc.
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// *   http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */
//package org.com.atmarkcafe.sky;
//
//import org.json.JSONException;
//import org.json.JSONObject;
//
//import android.app.Notification;
//import android.app.PendingIntent;
//import android.content.Context;
//import android.content.Intent;
//import android.os.Bundle;
//import android.os.Vibrator;
//import android.support.v4.app.NotificationCompat;
//import android.util.Log;
//
//import com.trickyandroid.fragmenttranslate.app.R;
//
///**
// * Handling of GCM messages.
// */
//public class GcmBroadcastReceiver extends ParsePushBroadcastReceiver {
//	static final String TAG = "GCMDemo";
//
//	@Override
//	protected Notification getNotification(Context context, Intent intent) {
//		Bundle extras = intent.getExtras();
//		String jsonData = extras.getString("com.parse.Data");
//		String title = "Sky";
//		String message = "";
//		if (jsonData != null) {
//			try {
//				JSONObject data = new JSONObject(jsonData);
//				message = data.getString("alert");
//			} catch (JSONException e) {
//				Log.e(TAG, "Error parsing json data");
//			}
//		} else {
//			Log.e(TAG, "cannot find notification data");
//		}
//
//		PendingIntent contentIntent = null;
//		Intent notificationIntent = new Intent(context, SplashActivity.class);
//		contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
//		Vibrator v = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
//		// Vibrate for 300 milliseconds
//		v.vibrate(300);
//		NotificationCompat.Builder builder = new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_launcher).setContentTitle(title).setContentText(message)
//				.setContentIntent(contentIntent).setDefaults(Notification.DEFAULT_ALL).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message));
//		return builder.build();
//	}
//
//}